/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * formDemo.java
 *
 * Created on Jan 5, 2010, 2:28:27 PM
 */

package example;

import java.sql.SQLException;

/**
 *
 * @author keysman
 */
public class formDemo extends our.gui.ourForm {

    /** Creates new form formDemo */
    public formDemo(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        // Compilare le due seguenti chiamante
        //setDB_Sort_Fields(""); // Campo/i su cui è ordinato lo scroll dei records (ad. es. cognome, nome)
        setDB_Table("DEMO");       // Tabella del DB alla quale è associata la form
        setDB_txtId_Field("id");    // Il campo del db di tipo autoinc (generalmente chiamato id) che verrà inserito in txtID (hidden)
        setRealDelete(false); // Settare a true se il record deve essere eliminato fisicamente dalla tabella
        setPrintForm("example.print.printDemo"); // Classe adibita alla stampa
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        ourPanel1 = new our.gui.ourPanel();
        ourLabel1 = new our.gui.ourLabel();
        ourTextField1 = new our.gui.ourTextField();
        ourLabel2 = new our.gui.ourLabel();
        ourTextField2 = new our.gui.ourTextField();
        ourLabel3 = new our.gui.ourLabel();
        ourTextField3 = new our.gui.ourTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        ourTable1 = new our.gui.ourTable();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        getContentPane().setLayout(null);

        ourPanel1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
        ourPanel1.setKeyFrame(true);
        ourPanel1.setLayout(null);

        ourLabel1.setText("Cognome");
        ourPanel1.add(ourLabel1);
        ourLabel1.setBounds(10, 10, 54, 20);

        ourTextField1.setCharsInputAllowed(5);
        ourTextField1.setFieldOnDB("cognome");
        ourTextField1.setHelpMsg("Cognome del cliente");
        ourTextField1.setKeyFrameFirstField(true);
        ourTextField1.setMaxTextLength(50);
        ourTextField1.setWithStar(true);
        ourTextField1.setZoomOnClass("example.zoom.zoomDemo");
        ourPanel1.add(ourTextField1);
        ourTextField1.setBounds(80, 10, 270, 20);

        getContentPane().add(ourPanel1);
        ourPanel1.setBounds(10, 40, 380, 30);

        ourLabel2.setText("Nome");
        getContentPane().add(ourLabel2);
        ourLabel2.setBounds(20, 85, 34, 17);

        ourTextField2.setCharsInputAllowed(2);
        ourTextField2.setFieldOnDB("nome");
        ourTextField2.setFirstFieldOutOfKeyFrame(true);
        ourTextField2.setMaxTextLength(25);
        ourTextField2.setWithStar(true);
        getContentPane().add(ourTextField2);
        ourTextField2.setBounds(90, 80, 290, 20);

        ourLabel3.setText("Tel.");
        getContentPane().add(ourLabel3);
        ourLabel3.setBounds(20, 115, 60, 17);

        ourTextField3.setCharsInputAllowed(2);
        ourTextField3.setFieldOnDB("tel");
        ourTextField3.setHelpMsg("Numero di telefono");
        ourTextField3.setMaxTextLength(20);
        getContentPane().add(ourTextField3);
        ourTextField3.setBounds(90, 110, 290, 20);

        ourTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(ourTable1);

        getContentPane().add(jScrollPane1);
        jScrollPane1.setBounds(10, 160, 452, 402);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    public void INSERT() throws SQLException { }

    public void DELETE() throws SQLException { }

    public void UPDATE() throws SQLException { }

    public void GOLAST() { }

    public void GOFIRST() { }

    public void GONEXT() { }

    public void GOPREV() { }

    public void GOTO() { }

    public void GOTO(Object[] KEY) { }

    public void CALLZOOM() { }

    public Object GETFIELDSVALUE() { return null; }

    public void SETFIELDSVALUE() { }

    public boolean BEFOREWRITING(boolean bShowTheMessage) { return true; }

    public void RESET() { }

    public void ENABLE(boolean bEnable) { }

    public String USER_FOUND_KEY() { 
        return null;
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private our.gui.ourLabel ourLabel1;
    private our.gui.ourLabel ourLabel2;
    private our.gui.ourLabel ourLabel3;
    private our.gui.ourPanel ourPanel1;
    private our.gui.ourTable ourTable1;
    private our.gui.ourTextField ourTextField1;
    private our.gui.ourTextField ourTextField2;
    private our.gui.ourTextField ourTextField3;
    // End of variables declaration//GEN-END:variables

}
